<?php

namespace app\common\service\RpcService\RpcClient;

/**
 * RPC 授权中心
 * @author chenshubo
 */
class RpcAuthoration
{
    const RPC_KEY = 'MangBangPlatformRpcDC#123456';//密钥key
    /**
     * 获取token加签
     * @param array $param
     */
    public static function getAuthTokenByParameters( $param = [] )
    {
        ksort($param);
        $string = json_encode($param,JSON_UNESCAPED_UNICODE);
        $string = rawurlencode($string);
        return sha1($string.self::RPC_KEY);
    }
}